From: kfraser@dhcp93.uk.xensource.com Date: Fri, 30 Jun 2006 09:04:22 +0000 (+0100) Subject: [NET]: Remove gso.segs field from netif protocol. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15912^2~23 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=ff695fb354f92a11adceb627235a2d929f26cda1;p=xen.git [NET]: Remove gso.segs field from netif protocol. From: Herbert Xu Signed-off-by: Keir Fraser --- diff --git a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c index 56dc731167..93e39612bc 100644 --- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c +++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c @@ -819,17 +819,20 @@ static void net_tx_action(unsigned long unused) struct netif_extra_info *gso; gso = &extras[XEN_NETIF_EXTRA_TYPE_GSO - 1]; + /* Currently on TCPv4 S.O. is supported. */ if (gso->u.gso.type != XEN_NETIF_GSO_TCPV4) { - DPRINTK("Bad GSO type.\n"); + DPRINTK("Bad GSO type %d.\n", gso->u.gso.type); kfree_skb(skb); netbk_tx_err(netif, &txreq, i); break; } skb_shinfo(skb)->gso_size = gso->u.gso.size; - skb_shinfo(skb)->gso_segs = gso->u.gso.segs; - skb_shinfo(skb)->gso_type = - SKB_GSO_TCPV4 | SKB_GSO_DODGY; + skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4; + + /* Header must be checked, and gso_segs computed. */ + skb_shinfo(skb)->gso_type |= SKB_GSO_DODGY; + skb_shinfo(skb)->gso_segs = 0; } gnttab_set_map_op(mop, MMAP_VADDR(pending_idx), diff --git a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c index 8ebcf841d4..1c34a90614 100644 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c @@ -787,7 +787,6 @@ static int network_start_xmit(struct sk_buff *skb, struct net_device *dev) tx->flags |= NETTXF_extra_info; gso->u.gso.size = skb_shinfo(skb)->gso_size; - gso->u.gso.segs = skb_shinfo(skb)->gso_segs; gso->u.gso.type = XEN_NETIF_GSO_TCPV4; gso->type = XEN_NETIF_EXTRA_TYPE_GSO; diff --git a/xen/include/public/io/netif.h b/xen/include/public/io/netif.h index 39ca7b7461..dfd9627fd9 100644 --- a/xen/include/public/io/netif.h +++ b/xen/include/public/io/netif.h @@ -78,23 +78,19 @@ struct netif_extra_info { union { struct { /* - * Maximum payload size of each segment. For example, for TCP this + * Maximum payload size of each segment. For example, for TCP this * is just the path MSS. */ uint16_t size; /* - * Number of GSO segments. This is the number of segments that - * have to be generated for this packet given the MSS. - */ - uint16_t segs; - - /* - * GSO type. This determines the protocol of the packet and any + * GSO type. This determines the protocol of the packet and any * extra features required to segment the packet properly. */ uint16_t type; /* XEN_NETIF_GSO_* */ } gso; + + uint16_t pad[3]; } u; };